package com.daxiong.pattern.factory;

import org.junit.Test;

/**
 * 测试工厂方法
 *
 * @author sunyanxiong
 * @date 2017/4/23
 */
public class TestFactory {

    @Test
    public void test() {
        Creator creator = new ConcreteCreator();
        Product product = creator.factory(ConcreteProduct.class);
        product.method1();
        product.method2();
    }

}
